<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>动画操作</title>
    <script src="https://code.jquery.com/jquery-3.6.4.min.js" integrity="sha256-oP6HI9z1XaZNBrJURtCoUT5SUnxFr8s3BzRl+cbzUq8=" crossorigin="anonymous"></script>
    <script>
        var dfs=function(){
            $("div").toggle(2000);
            dfs();
        };
        $(function () {
            $("div").click(function () {
                $("div").fadeOut(2000);
            });

            $("button:first").click(function () {
                dfs();
            });
            $("button:eq(1)").click(function () {
                $("div").fadeIn(2000);
            });
            $("button:eq(2)").click(function () {
                $("div").fadeToggle(2000);
            });
        });

    </script>
</head>
<body>
        <div style="border: pink 1px solid"><img src="./jp1.jpg"></div>
        <button>不断的动</button>
        <button>不断的动</button>
        <button>不断的动</button>
</body>
</html>